#pragma once

#include <string>
#include <iostream>
#include <GL\glui.h>
#include "../RGBpixmap.h"

using namespace std;

class Texture
{
private:
	string ID;
	GLuint texID;
	char* file;
	float length_s, length_t;
public:
	Texture() {}
	Texture(string _ID, const char* _file, GLuint tID, float lS, float lT) 
	{
		ID = _ID;
		file = (char*) _file;
		length_s = lS;
		length_t = lT;
		texID = tID;	
	}
	void setID(string _ID)
	{
		ID = _ID;
	}
	string getID()
	{
		return ID;
	}
	unsigned int getTexID()
	{
		return texID;
	}
	void setValues(const char* _file, float _ls, float _lt, unsigned int tID)
	{
		file = (char*) _file;
		length_s = _ls;
		length_t = _lt;
		texID = tID;
	}
	void applyTexture()
	{	
		RGBpixmap* pixmap = new RGBpixmap();
		pixmap->readBMPFile(file);
		glGenTextures(1, &texID);
		pixmap->setTexture(texID);
	}
	float getLengthS()
	{
		return length_s;
	}
	float getLengthT()
	{
		return length_t;
	}
	char* getFileName()
	{
		return file;
	}
};